import request from '@/plugins/axios'

export function fetchList(query) {
    //alert(JSON.stringify(query));
  return request({
    url: '/api/assessindustrial/page',
    method: 'get',
    params: query
  })
}

export function addObj(obj) {
  return request({
    url: '/api/assessindustrial',
    method: 'post',
    data: obj
  })
}

export function getObj(id) {
  return request({
    url: '/api/assessindustrial/' + id,
    method: 'get'
  })
}

export function delObj(id) {
  return request({
    url: '/api/assessindustrial/' + id,
    method: 'delete'
  })
}

export function putObj(obj) {
  return request({
    url: '/api/assessindustrial',
    method: 'put',
    data: obj
  })
}

export function assessIndustrialImport(query){
    return request({
        url: '/api/assessindustrial/import',
        method: 'post',
        data: query,
        config:{
            headers:{'Content-Type':'multipart/form-data'}
        }
    })
}

//分步导入，第二步真正导入
export function doImport(data) {

    return request({
        url: '/api/assessindustrial/import-do',
        method: 'post',
        data: data
    })
}

export function validateCompanyName(data) {
    return request({
        url:'/api/assessindustrial/validateCompanyName',
        method:'get',
        params:data
    })

}


export function validateUser() {
    return request({
        url:'/api/assessindustrial/validateUser/getUser',
        method:'get',
    })
}

export function validateUserCreateBy(createBy) {
    return request({
        url:'/api/assessindustrial/validateUser/'+createBy,
        method:'get',
    })
}

export function getCompList(query) {
    return request({
        url:'/api/assessindustrial/getCompList',
        method:'get',
        params:query
    })
}
